<?php
/* 
* [网站配置管理控制器]
* @author: mazhenyu[houdunwangmzy@163.com]
* @Date:   2014-06-23 14:40:04
* @Last Modified time: 2014-06-23 16:54:31
*/
class WebSetControl extends CommonControl{
	/**
	 * [index 默认显示配置页面]
	 * @return [type] [description]
	 */
	public function index(){
		$model = K('WebSet');
		if(IS_POST){
			//执行修改
			$model->update_data();
			$this->success('修改成功');
		}
		$config = $model->get_all();
		$this->assign('config',$config);

		//遍历有什么模板
		$template = Dir::tree(ROOT_PATH . 'Template');
	
		$this->assign('template',$template);

		$this->display();
	}
}
